package teamwork.pc.dto;

import java.io.Serializable;

import org.seasar.framework.container.annotation.tiger.Component;
import org.seasar.framework.container.annotation.tiger.InstanceType;

import teamwork.pc.entity.Staff;

@Component(instance=InstanceType.SESSION)
public class LoginUserDto implements Serializable{
    private static final long serialVersionUID = 1L;
    public String staffEmail = null;
    public String staffPassword = null;
    public boolean loggedin = false;
    /**
     *
     * @return
     */
    public String getStaffAccount()
    {
        return staffEmail;
    }
    /**
     *
     * @return
     */
    public String getStaffPassword(){
        return staffPassword;
    }
    /**
     *
     * @return
     */
    public boolean isLogin()
    {
        return loggedin;
    }
    public void login(Staff s)
    {
        this.staffEmail = s.email;
        this.staffPassword = s.password;
        this.loggedin = true;
    }
    public void logout()
    {
        this.staffEmail = null;
        this.staffPassword = null;
        this.loggedin = false;
    }
}
